package com.sunop.userservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunop.userservice.model.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * @since 2025-03-13
 */
@Mapper
public interface RoleMapper extends BaseMapper<UserRole> {

    @Update("update role set point = point + #{points} where id = #{userId}")
    void updateUserPoints(int userId, int points);

    void updateProblemPoint(int loginIdAsInt, int difficulty);
}
